package com.xhtech.base.ext.databinding

import androidx.databinding.BindingAdapter
import com.ruffian.library.widget.RTextView


/**
 * 作者 : yuan_xh
 * 时间 : 2022/8/19 10:32
 * 说明 : 基于RView的databinding扩展
 */
object RViewDataBindingAdapter {

    @JvmStatic
    @BindingAdapter(value = ["isSelect"])
    fun isSelect(rtv: RTextView, isSelect: Boolean) {
        rtv.isSelected = isSelect
    }

    @JvmStatic
    @BindingAdapter(value = ["isEnabled"])
    fun isEnabled(rtv: RTextView, isEnabled: Boolean) {
        rtv.isEnabled = isEnabled
    }
}